package com.personal.summaryofproject.service;


import com.personal.summaryofproject.utils.poi.PoiUtils;
import com.personal.summaryofproject.utils.poi.WriteExcelFileUtil;
import com.personal.summaryofproject.utils.poi.bean.FileDataBean;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.io.File;


/**
 * description: 文件操作服务 <br>
 * date: 2020/4/18 15:46 <br>
 * author: wenjun.dai <br>
 * version: 1.0 <br>
 */
@Service
@Slf4j
public class FileService {


    public File getFile(String fileEncode, String fileName) {
        FileDataBean fileDataBean = PoiUtils.getFileDataBean(fileEncode, fileName,null);
        File file = WriteExcelFileUtil.writeFileDefault(fileDataBean, fileName);
        return file;
    }

}
